package com.raymond.queue.client.codec.encodeing;

import com.alibaba.fastjson.JSONObject;
import com.raymond.queue.common.codec.annotation.MsgCodec;
import com.raymond.queue.common.codec.encodeing.BaseEncoder;
import com.raymond.queue.common.enums.CommandIdType;
import com.raymond.queue.common.msg.BaseMessage;

/**
 * 创建消费组请求编码
 *
 * @author :  raymond
 * @version :  V1.0
 * @date :  2021-07-27 16:14
 */
@MsgCodec(commandId = CommandIdType.CREATE_CONSUMPTION_REQ)
public class CreateConsumptionRequestEncoder extends BaseEncoder {
    @Override
    public byte[] encode0(BaseMessage msg) {
        return JSONObject.toJSONString(msg).getBytes();
    }
}
